﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Lswweb.Domain;
using Lswweb.Model;

namespace Lswweb.Controls
{
    public class ProductFileList : UpFileList
    {
        protected override IList<UpFileInfo> GridViewDataSourceHandler(int pageIndex, int pageSize, out int totalRecord)
        {
            IList<UpFileInfo> images = Products.GetProduct(ProductId).ImageFiles;
            totalRecord = images.Count;
            return images;
        }

        public int ProductId
        {
            get { return Convert.ToInt32(SiteContext.Current.Parameters); }
        }
    }
}
